<?

function getLang ($lang, $form) {
	switch ($lang) {
		case 'de':
		case 'deu':
		case 'german':
			$arrLang = array('S' => 'de', 'M' => 'deu', 'L' => 'german');
			$ret = $arrLang[$form];
			break;
			
		case 'en':
		case 'eng':
		case 'english':
			$arrLang = array('S' => 'en', 'M' => 'eng', 'L' => 'english');
			$ret = $arrLang[$form];
			break;

		case 'fr':
		case 'fra':
		case 'french':
			$arrLang = array('S' => 'fr', 'M' => 'fra', 'L' => 'french');
			$ret = $arrLang[$form];
			break;
			
		case 'no':
		case 'nor':
		case 'norwegian':
			$arrLang = array('S' => 'no', 'M' => 'nor', 'L' => 'norwegian');
			$ret = $arrLang[$form];
			break;
			
		default:
			break;
	}
	return $ret;
}



function optShow ($text, $value) {

	if (!empty($value)) 
		return substr($text,0,1) . $value . substr($text,-1);
	else
		return '';
}


?>